import yagmail,logging,yaml
def log_set():
    logging.basicConfig(filename='./log/xiachufang.txt',level=logging.DEBUG,filemode='w+',format='%(asctime)s->%(thread)d->%(message)s')

def send_mail(qq):
    mail =yagmail.SMTP(host='smtp.qq.com',user='2410811597@qq.com',password='uulxfswthtmedihb')
    mail.send(to='2410811597@qq.com',subject='dafasf',contents='dasfas',attachments=qq)
def read_data_from_yaml(flipath):
    with open(flipath,'r',encoding='utf-8')as f:
        return yaml.safe_load()